package d3_buffered_reader;

import java.io.*;

/**
 * 2024/6/18 掌握字符缓冲输入流的用法 Cjj 12:22
 */
public class BufferedReaderTest1 {
    public static void main(String[] args) {

        try (
            Reader fr= new FileReader("file-io2\\src\\test\\FileReader.txt");
             //1.创建字符缓存输入流包装原始的文件
            BufferedReader br= new BufferedReader(fr);
        ) {
 /*           char[] buffer = new char[3];
            int len=3;
            while ((len=br.read(buffer))!=-1){
                System.out.println(new String(buffer, 0, len));
            }*/
            System.out.println(br.readLine());
            System.out.println(br.readLine());
            System.out.println(br.readLine());
            System.out.println(br.readLine());
            System.out.println(br.readLine());

        } catch (Exception e) {
           e.printStackTrace();
        }
    }
}
